package com.example.service;

import java.util.List;

/**
 * 用户服务接口示例
 * 在实际项目中，这应该替换为您现有的用户服务接口
 */
public interface UserService {
    
    /**
     * 根据用户ID查找用户
     * @param userId 用户ID
     * @return 用户信息
     */
    User findUserById(String userId);
    
    /**
     * 根据用户ID查找用户所属的组
     * @param userId 用户ID
     * @return 用户组列表
     */
    List<Group> findGroupsByUser(String userId);
    
    /**
     * 用户信息类
     */
    class User {
        private String id;
        private String name;
        private String lastName;
        private String email;
        
        // 构造函数
        public User() {}
        
        public User(String id, String name, String lastName, String email) {
            this.id = id;
            this.name = name;
            this.lastName = lastName;
            this.email = email;
        }
        
        // Getter和Setter方法
        public String getId() { return id; }
        public void setId(String id) { this.id = id; }
        
        public String getName() { return name; }
        public void setName(String name) { this.name = name; }
        
        public String getLastName() { return lastName; }
        public void setLastName(String lastName) { this.lastName = lastName; }
        
        public String getEmail() { return email; }
        public void setEmail(String email) { this.email = email; }
    }
    
    /**
     * 组信息类
     */
    class Group {
        private String id;
        private String name;
        private String type;
        
        // 构造函数
        public Group() {}
        
        public Group(String id, String name, String type) {
            this.id = id;
            this.name = name;
            this.type = type;
        }
        
        // Getter和Setter方法
        public String getId() { return id; }
        public void setId(String id) { this.id = id; }
        
        public String getName() { return name; }
        public void setName(String name) { this.name = name; }
        
        public String getType() { return type; }
        public void setType(String type) { this.type = type; }
    }
}